package com.xinxin.facelinker.activity;

import android.app.Activity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;

import com.easemob.chatuidemo.R;
import com.google.zxing.WriterException;
import com.xinxin.facelinker.Config;
import com.xinxin.facelinker.QRcode.encoding.EncodingHandler;

public class CreateQRcodeActivity extends Activity {

    private String account_num="123456789";
    private ImageView imgQRcode;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_creat_qrcode);

        imgQRcode = (ImageView) findViewById(R.id.imgQRcode);
//        account_num= Config.getCachedAccountNum(CreateQRcodeActivity.this);

        try {
            Bitmap qrcode = EncodingHandler.createQRCode(account_num, 800);
            imgQRcode.setImageBitmap(qrcode);
        } catch (WriterException e) {
            e.printStackTrace();
        }
    }
}
